package com.mccken.demo.proxy.cglib.cglib2;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

/**
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2022-11-01 16:31
 **/
public class Tank59MethodInterceptor implements MethodInterceptor {
	@Override
	public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {

		System.out.println("Tank59MethodInterceptor before" + method.getName());

		Object o = proxy.invokeSuper(obj, args);

		System.out.println("Tank59MethodInterceptor after " + method.getName());
		
		return o;
	}
}
